Skip to content

SILGen: Emit copy x on a trivial value as a trivial copy. #80773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

jckarter
Copy link
Contributor

Avoids an assertion failure emitting an explicit_copy_value on the trivial value, which is unsupported. This allows copy x to compile, albeit with no effect (which is not ideal, but also not a regression, since no-implicit-copy controls still don't fully work on trivial values). Fixes #80573 and rdar://148712387.

@jckarter
Copy link
Contributor Author

@swift-ci Please test

Avoids an assertion failure emitting an `explicit_copy_value` on the trivial
value, which is unsupported. This allows `copy x` to compile, albeit with
no effect (which is not ideal, but also not a regression, since no-implicit-copy
controls still don't fully work on trivial values). Fixes swiftlang#80573 and rdar://148712387.
@jckarter jckarter force-pushed the trivial-copy-operator branch from c5188e5 to 8dac2b1 Compare April 12, 2025 00:51
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter
Copy link
Contributor Author

@swift-ci Please test Linux

@jckarter
Copy link
Contributor Author

@swift-ci Please test macOS

1 similar comment
@jckarter
Copy link
Contributor Author

@swift-ci Please test macOS

@jckarter jckarter merged commit 7ce06dd into swiftlang:main Apr 15, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6.1+ compiler crash (Assertion failed: (!operand->getType().isTrivial(getFunction()))
1 participant